# jsb/db/__init__.py
#
#

""" main db package """

## gotsqlite function

def gotsqlite():
    try: import sqlite
    except ImportError:
        try: import sqlite3
        except: return False
    return True

## getmaindb function

def getmaindb():
    from jsb.lib.config import getmainconfig
    cfg = getmainconfig()
    if cfg.dbenable:
        from direct import Db
        return Db()
